<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<%@ include file="/base.jsp"%>
</head>
<body class="easyui-layout">
	
	<div data-options="region:'center',title:'easyui 在线api'"
		style="padding: 5px; background: #eee;">
		<table id="dg"></table>
	</div>

	<script type="text/javascript">
		var dg;
		$(function() {
			dg = $('#dg')
					.datagrid(
							{
								method : "post",
								url : '${ctx}/eui/getEui.do',
								fit : true,
								fitColumns : true,
								border : false,
								idField : 'id',
								striped : true,
								pagination : true,
								rownumbers : true,
								pageNumber : 1,
								pageSize : 20,
								pageList : [ 10, 20, 30, 40, 50 ],
								singleSelect : true,
								columns : [ [
										{
											field : 'id',
											title : 'id',
											hidden : true,
											width : 100
										},
										{
											field : 'name',
											title : '名字',
											align : 'center',
											sortable : false,
											width : 60
										},
										{
											field : 'url',
											title : '在线地址',
											align : 'center',
											sortable : false,
											formatter : function(value,
													rowData, rowIndex) {
												var tem = '<a  href="'+value+'" target="_blank" >'+value+'</a>';
												if (value == null
														|| value == '')
													tem = '';
												return tem;
											},
											width : 120
										},
										{
											field : 'ut',
											title : '发布时间',
											sortable : false,
											align : 'center',
											formatter : function(value, row,
													index) {
												return formatTime(value);
											},
											width : 80
										} ] ],
								enableHeaderClickMenu : false,
								enableHeaderContextMenu : false,
								enableRowContextMenu : false
							});

		});
	</script>
</body>
</html>
